 <?php
	$public_application = $this->config->item('public_application');
 ?>
 <script src="<?php echo base_url($public_application."js/jquery.validate.min.js")?>"></script>
<div class="main-bg clearfix">
  <div class="container main-box clearfix">
    <div class="row">
      <div class="col-md-7"> 
        <div class="login-left">
	        <a href="<?php echo site_url("account/register");?>"><img src="<?php echo base_url($public_application."images/login_reg.jpg")?>" class="img-responsive" /></a>
	        <img src="<?php echo base_url($public_application."images/login_pic.png")?>" class="img-responsive" />
        </div>
      </div>
      <div class="col-md-5">
	  <?php echo form_open('account/loginaction','class="login-form" id="login_form" role="form" autocomplete="off"');?>
              <h4>欢迎登陆</h4>
			  <div class="input-group" style="margin-bottom:20px;">
			    <span class="input-group-addon">
			      <span class="glyphicon glyphicon-user"></span>
			    </span>
			    <input type="text" name='username' class="form-control input-lg" id="exampleInputEmail1" placeholder="用户名" required>
			  </div>
			  <div class="input-group"  style="margin-bottom:20px;">
			    <span class="input-group-addon">
			      <span class="glyphicon glyphicon-lock"></span>
			    </span>
			    <input type="password" name='password' class="form-control input-lg" id="exampleInputPassword1" placeholder="密码" required>
			  </div>
			  		 <?php
		 
		if($captchaconf['login_need']){
		?>
		 <div class="input-group">
			
		 <span class="input-group-addon">
			      <span class="glyphicon glyphicon-adjust"></span>
			    </span>
			<input type="text" class="form-control input-lg" name='captcha' required placeholder="验证码">
			 <span class="input-group-addon">
			      <span class="glyphicon" id='captcha'><?php echo $captcha;?></span>
			 </span>

		 </div>
		<script>

			$('#captcha').click(function (){
				get_captcha($(this),'app');
			});
		</script>
		<?php
			}
		 
		 ?>
			  <div class="form-group row">
				  <div class="col-sm-8 col-xs-8">
				      <!--<div class="checkbox">
				        <label>
				          <input type="checkbox" name="remember">保存登陆信息
				        </label>
				      </div>-->
				  </div>
				  <div class="col-sm-4 col-xs-4">
                    <div class="checkbox text-right">
				      <a href="<?php echo site_url('account/get_password')?>">忘记密码</a>
				    </div> 
				  </div>
			  </div>
			  
			  <button type="submit" class="btn btn-danger btn-lg center-block"  name='submit'>&nbsp;&nbsp;&nbsp;&nbsp;登&nbsp;&nbsp;&nbsp;陆&nbsp;&nbsp;&nbsp;&nbsp;</button>
			  <p class="mt-1em">还没帐号? <a href="<?php echo site_url("account/register");?>" >立即注册</a></p>
			  <p>可使用卓普手机官网帐号登陆</p>
			<?php echo form_close();?>
      </div>
    </div>
  </div>
</div>
  <script>
 $(document).ready(function(){
	 $('#login_form').validate({
		
		 errorPlacement: function(error, element) {
			    error_box = $('<div class="col-md-5 col-sm-5 "> </div>');
			    error_box.append(error);
			    
			      error_box.appendTo(element);  
		 }
	 });
 });
</script>